<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<title>Маршруты</title>
<a href="main">
	<div class="mybutton">
		На главную
	</div>
</a>
<br><br><br>
<table>
<tr>
	<th>Номер маршрута</th>
	<th>Название</th>
	<th>Статус</th>
	<th>Откуда</th>
	<th>Куда</th>
</tr>

<c:forEach items="${routes}" var="route" varStatus="i">
	<tr>
		<td><a href="route?id=${route.id}"> №${route.number}</a></td>
		<td>${route.name}</td>
		<c:if test="${route.active == true}">
			<td>Активен</td>
		</c:if>
		<c:if test="${route.active == false}">
			<td>Неактивен</td>
		</c:if>
		<td>${strings.get(i.index * 2 + 0)}</td>
		<td>${strings.get(i.index * 2 + 1)}</td>
	</tr>
</c:forEach>
</table>
<a href="route_add"> 
	<div class="mybutton" style="width: 150px">
		Добавить новый маршрут
	</div>
</a>
<%@ include file="/WEB-INF/jsp/footer.jsp" %>